<template>
    <div class="height_100">
        <StepTwo :dataForm="dataForm" v-if="dataForm.step==1" />
        <StepOne :dataForm="dataForm" v-else-if="dataForm.step==2" />
        <StepThree :dataForm="dataForm" v-else-if="dataForm.step==3" />
        <StepFour :dataForm="dataForm" v-else-if="dataForm.step==4" />
        <StepFive :dataForm="dataForm" v-else-if="dataForm.step==5" />
    </div>
</template>

<script>
import StepOne from "./StepOne";
import StepTwo from "./StepTwo";
import StepThree from "./StepThree";
import StepFour from "./StepFour";
import StepFive from "./StepFive";
export default {
    components: {
        StepOne,
        StepTwo,
        StepThree,
        StepFour,
        StepFive
    },
    name: "",
    data() {
        return {
            dataForm: {
                step: 1,
                delivery_index: 0, //当前预算下标
                audience_index: 0, //当前定向下标
                creatives_index: 0, //当前创意下标
                is_change:false,
                base: [
                    {
                        objective_type: "PRODUCT_SALES",
                        advertiser_id: "",
                        advertiser_name:"",
                        campaign_product_source: "STORE",
                        store_id: "",
                        store_name:"",
                        store_authorized_bc_id: "",
                        catalog_id: "",
                        targeting_region_codes: [],
                        catalog_authorized_bc_id: "",
                        identity_authorized_bc_id: "",
                        identity_id: "",
                        identity_type: "",
                        profile_image:"",
                        display_name:"",
                    },
                ],
                // base: {},
                campaign: {
                    operation_status: "DISABLE",
                    campaign_name: this.dayjs().format("MMDD")+'_',
                    budget_mode: "BUDGET_MODE_INFINITE",
                    budget_mode_status: "BUDGET_MODE_INFINITE",
                    budget: "",
                    campaign_product_source: "STORE",
                    campaign_id:""
                },
                adgroup: {
                    adgroup_name: "",
                    operation_status: "ENABLE",
                    placements: ["PLACEMENT_TIKTOK"],
                    comment_disabled: false,
                    video_download_disabled: true,
                    promotion_type: "VIDEO_SHOPPING",
                    shopping_ads_type: "VIDEO",
                    product_source: "STORE",
                    delivery: [
                        {
                            budget: 20,
                            delname: "预算分组1",
                            budget_mode: "BUDGET_MODE_DAY",
                            schedule_type: "SCHEDULE_FROM_NOW",
                            schedule_start_time: "",
                            schedule_end_time: "",
                            dayparting_type: 1,
                            dayparting:
                                "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
                            optimization_goal: "VALUE",
                            optimization_event: "SHOPPING",
                            deep_bid_type: "VO_HIGHEST_VALUE",
                            roas_bid: "",
                            bid_type: "BID_TYPE_NO_BID",
                            bid_price: null,
                            conversion_bid_price: null,
                            pacing: "PACING_MODE_SMOOTH",
                            billing_event: "OCPM",
                        },
                    ],
                    audience: [
                        {
                            audname: "定向分组1",
                            location_ids: [],
                            audience_ids: [],
                            excluded_audience_ids: [],
                            all_audience: [],
                            interest_category_ids: [],
                            interest_keywords_ids: [],
                            age_groups: [],
                            age_all: "1",
                            operating_systems:[],
                            operating_all:"1",
                            gender: "GENDER_UNLIMITED",
                            languages: [],
                            actions: [
                                {
                                    action_category_ids: [],
                                    action_scene: "VIDEO_RELATED",
                                    action_period: "",
                                    is_show: false,
                                    video_user_actions: [],
                                },
                                {
                                    action_category_ids: [],
                                    action_scene: "CREATOR_RELATED",
                                    action_period: 0,
                                    is_show: false,
                                    video_user_actions: [],
                                },
                                {
                                    action_category_ids: [],
                                    action_scene: "HASHTAG_RELATED",
                                    action_period: 0,
                                    is_show: false,
                                    video_user_actions: ["VIEW_HASHTAG"],
                                },
                            ],
                        },
                    ],
                },
                creatives_base: {
                    operation_status: "ENABLE",
                    ad_name: "",
                    ad_format: "SINGLE_VIDEO",
                    creatives_class: [
                        {
                            creaname: "创意分组1",
                            call_to_action: "APPLY_NOW",
                            card_type: "",
                            card_tags: [],
                            card_show_price: false,
                            item_group_ids: [],
                            vertical_video_strategy: "SINGLE_VIDEO",
                            creatives: [],
                        },
                    ],
                },
                name: "任务名称",
                execution_time: "",
                advertiser_ids:[],
                crea_type:2,
                gap_time:0
            },
        };
    },
    created() {
        this.dataForm = JSON.parse(window.sessionStorage.getItem("tkForm"))
            ? JSON.parse(window.sessionStorage.getItem("tkForm"))
            : this.dataForm;
    },
    methods: {},
};
</script>


<style scoped>
</style>

